function ajax(type, url,data) {
    var xhr = new XMLHttpRequest();
    xhr.open(type, url, true);
    xhr.send(data)
}
ajax('POST', 'www.baidu.com','name=tom')
ajax('POST', 'www.alibaba.com','name=tom')
ajax('POST', 'www.tencent.com','name=tom')

var ajaxCurry = curry(ajax)
var post  = ajaxCurry('POST')
post('www.alibaba.com','name=tom')

var postFromTest = post('www.alibaba.com')
postFromTest('name=tom')